﻿@model IEnumerable<Testicide.Models.Scenario>


@{
    ViewBag.Title = "Index";
}


<div class="order">
    <h2 style="margin-left:10px;">@Html.DisplayFor(modelitem => Model.First().Feature.Name)</h2>
    <a href="@Url.Action("Details", "Feature", new { id = Model.First().FeatureID })"><b>Add Scenario</b><img id="add" src="~/pictures/addnew.png" /></a>

    <table class="table table-hover">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Content)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Date)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Content)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Date)
                </td>
                <td>
                    <a href="@Url.Action("Edit","Scenario", new { id=item.ID })">
                        <img class="icons" src="~/pictures/edit.png" />
                    </a>|
                    <a href="@Url.Action("Delete","Scenario", new { id=item.ID })">
                        <img class="icons" src="~/pictures/delete.png" />
                    </a>
                </td>
            </tr>
        }

    </table>
    @Html.ActionLink("Back to Features","Index","Feature")
</div>
